home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / clonecd / September 93.img / Archives / Utilities / Quicktime / SLINK's VCR QuickTime / MP Source / Alert_Class.c < prev    next >
Text File  |  1992-06-13  |  2KB  |  80 lines

  1. /*---------------------------------------------------------------------
  2.     Program: Alert.c
  3.     By: Geoffrey Slinker
  4.     Date: 9:12:36 AM  6/9/92
  5.     Purpose: Contains methods for Alert class, see Alert.h
  6. ---------------------------------------------------------------------*/
  7. #include <stdio.h>
  8. #include <string.h>
  9.  
  10. #include "Alert_Class.h"
  11.  
  12. void CleanUpMyStuff(void);
  13. /**********************************************************************/
  14. Alert_Class::Alert_Class(void)    // constructor code
  15. {    
  16.     rsrcNumber = 0;
  17. }
  18. /*....................................................................*/
  19. Alert_Class::~Alert_Class(void)    // destructor code
  20. {    
  21. }
  22. /*....................................................................*/
  23. void Alert_Class::ChooseResource(int rsrcNumber)
  24. {
  25.     (*this).rsrcNumber = rsrcNumber;
  26. }
  27. /*....................................................................*/
  28. void Alert_Class::AlertNote(Str255 p0, Str255 p1, Str255 p2, Str255 p3)
  29. {
  30.     int rN;
  31.     
  32.     rN = (*this).rsrcNumber;
  33.     if ( rN == 0  ) {
  34.         SysBeep(7);
  35.         return;
  36.     } /* end if */
  37.     
  38.     ParamText(p0,p1,p2,p3);
  39.     
  40.     NoteAlert(rN,(ProcPtr)NULL);
  41.     
  42.     ParamText("\p","\p","\p","\p");
  43. }
  44. /*....................................................................*/
  45. void Alert_Class::AlertCaution(Str255 p0, Str255 p1, Str255 p2, Str255 p3)
  46. {
  47.     int rN;
  48.     
  49.     rN = (*this).rsrcNumber;
  50.     if ( rN == 0  ) {
  51.         SysBeep(7);
  52.         return;
  53.     } /* end if */
  54.     
  55.     ParamText(p0,p1,p2,p3);
  56.     
  57.     CautionAlert(rN,(ProcPtr)NULL);
  58.  
  59.     ParamText("\p","\p","\p","\p");
  60. }
  61. /*....................................................................*/
  62. void Alert_Class::AlertStop(Str255 p0, Str255 p1, Str255 p2, Str255 p3)
  63. {
  64.     int rN;
  65.     
  66.     rN = (*this).rsrcNumber;
  67.     if ( rN == 0  ) {
  68.         SysBeep(7);
  69.         return;
  70.     } /* end if */
  71.     
  72.     ParamText(p0,p1,p2,p3);
  73.     
  74.     StopAlert(rN,(ProcPtr)NULL);
  75.  
  76.     ParamText("\p","\p","\p","\p");
  77.     
  78.     CleanUpMyStuff();
  79.     ExitToShell();
  80. }